#pragma once
#include <osg/Vec3d>

#include "CmdHandler3.h"

class Ent;
class Ent2D;
class UCS;
class Array2DDialog;
class ArrayHandler : public CmdHandler3
{
	Q_OBJECT
public:
	Q_INVOKABLE ArrayHandler();
	~ArrayHandler();
	virtual void input(const QVariant& data, const QString& rawInput, CommandSource cs) override;

	void rectCopy(int rowNumber, double rowDistance, int columnNumber, double columnDistance, float arrayCopyAngle);
	void roundCopy(double xCoordinate, double yCoordinate, int totalCount, float angle);
	void clearPreview();

	std::vector<std::shared_ptr<Ent>> m_origins;
	std::set<std::shared_ptr<INode>> arrayEnts;
	UCS* m_ucs;
	Scene* m_scene;
	Array2DDialog* m_dialog;
	int m_nodeMask = 0;
};